﻿/*
 * LdControl
 * 
 * initial implementation : 26.6.2013
 *
 * Copyright (c) Adam Sida, asida@centrum.cz.
 * All rights reserved.
 * 
 * for license see cz.uhul.DSMLv2.txt
 */
using System;
using System.Xml.Serialization;

namespace cz.uhul.DSMLv2
{


  /// <Summary>
  /// The LDAP control instruction, specifies extension
  /// data for various LDAP operations.
  /// </Summary>
  [Serializable()]
  [XmlType(TypeName = "control")]
  public class LdControl : LdAttrAndCtlBase
  {



    public LdControl() { }

    /// <Summary>
    /// The System.DirectoryServices.Protocols.DirectoryControl.#ctor(System.String,System.Byte[],System.Boolean,System.Boolean)
    /// constructor creates an instance of the System.DirectoryServices.Protocols.DirectoryControl
    /// class using the specified values for the type, value, criticality, and ServerSide
    /// properties.
    /// </Summary>
    /// Parameters:
    ///   type:
    /// The control type.
    ///
    ///   value:
    /// The value associated with the control.
    ///
    ///   isCritical:
    /// Specifies if the control is critical. The default is true.
    ///
    ///   serverSide:
    /// Specifies if this is a server-side control. The default is true. false specifies
    /// a client-side control.
    ///
    /// Exceptions:
    ///   System.ArgumentNullException:
    /// type parameter is null.
    public LdControl(string type, byte[] value, bool isCritical, bool serverSide)
    {
      throw new NotImplementedException();
    }





    /// <Summary>
    /// The LdControl.IsCritical property
    /// specifies whether the control is critical.
    /// </Summary>
    [XmlAttributeAttribute(AttributeName = "criticality")]
    public bool IsCritical { get; set; }





    
    /// <Summary>
    /// The LdControl.ServerSide property
    /// specifies whether this is a server-side control.
    /// </Summary>
    [XmlAttributeAttribute(AttributeName = "serverside")]
    public bool ServerSide { get; set; }





    
    /// <Summary>
    /// The LdControl.Type property contains
    /// the object identifier (OID) of the control.
    /// </Summary>
    [XmlAttributeAttribute(AttributeName = "type")]
    public string Type { get; set; }






    /// <Summary>
    /// The LDControl.GetValue() method
    /// returns the data associated with the control.
    /// </Summary>
    public virtual byte[] GetValue()
    {
      throw new NotImplementedException();
    }


  }

}